<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk">
    <head>

    </head>
    <body>
        <ui:composition template="/MenuTemplate_wave.xhtml">
            <ui:define name="content_nav">
                #{msg.content_nav_motormanage}
            </ui:define>
            <ui:define name="content">
                <h:form id="iptLxkrPrjForm">
                    <h:panelGrid  styleClass="body_content_box" columns="1">
                        <h:messages globalOnly="true" infoClass="info"  errorClass="alert" fatalClass="colorOrange" />
                        <h:panelGrid styleClass="title_border" columns="1" cellpadding="0" cellspacing="0">
                            <h:panelGrid styleClass="search_title" columns="1" cellpadding="0"
                                         cellspacing="2">
                                <h:outputLabel value="#{msg.content_title_lxkr_basic_info}"  style="vertical-align: middle"/>
                            </h:panelGrid>
                            <h:panelGrid style="width: 100%; margin: 3px 5px 0px 5px" cellpadding="0" border="0" cellspacing="3">
                                <h:panelGrid columns="1" cellspacing="0" style="width: 95%">
                                    <!--  区域、小区名、工程覆盖类型、扩容类型   --> 
                                    <h:panelGrid columns="3" cellspacing="0" style="width:100%;text-align: left" >
                                        <h:panelGrid columnClasses="com_width_50,com_width_75" columns="2" cellpadding="2" border="0" cellspacing="0">
                                            <h:outputLabel value="#{msg.label_motor_domain}" styleClass="com_label_blue"></h:outputLabel>
                                            <h:outputText value="#{motorBookListBean.currentMotorInfo.domainInfo.domainName}" ></h:outputText>
                                        </h:panelGrid>
                                        <h:panelGrid columnClasses="com_width_50,com_width_75" columns="2" cellpadding="2" border="0" cellspacing="0">
                                            <h:outputLabel value="#{msg.label_motor_number}" styleClass="com_label_blue"></h:outputLabel>
                                                
                                            <h:outputText value="#{motorBookListBean.currentMotorInfo.motorNum}" />
                                        </h:panelGrid>
                                        <h:panelGrid columnClasses="com_width_50,com_width_75" columns="2" cellpadding="2" border="0" cellspacing="0">
                                            <h:outputLabel value="#{msg.label_motor_style}" styleClass="com_label_blue"></h:outputLabel>
                                                
                                            <h:outputText value="#{motorBookListBean.currentMotorInfo.motorStyle}"  />
                                        </h:panelGrid>
                                        <!--  驾驶员信息   -->
                                        <h:panelGrid columnClasses="com_width_50,com_width_75" columns="2" cellpadding="2" border="0" cellspacing="0">
                                            <h:outputLabel value="#{msg.label_driver_name}" styleClass="com_label_blue"></h:outputLabel>
                                                
                                            <h:outputText value="#{motorBookListBean.currentMotorInfo.driverName}"  />
                                        </h:panelGrid>
                                        <h:panelGrid columnClasses="com_width_50,com_width_75" columns="2" cellpadding="2" border="0" cellspacing="0">
                                            <h:outputLabel value="#{msg.label_driver_phone}" styleClass="com_label_blue"></h:outputLabel>
                                                
                                            <h:outputText value="#{motorBookListBean.currentMotorInfo.driverPhone}" />
                                        </h:panelGrid>
                                        <h:panelGrid columnClasses="com_width_50,com_width_75" columns="2" cellpadding="2" border="0" cellspacing="0">
                                            <h:outputLabel value="#{msg.label_motor_search_date}" styleClass="com_label_blue"></h:outputLabel>
                                            <h:outputText value="#{motorBookListBean.searchDate}">
                                                <f:convertDateTime pattern="yyyy-MM-dd"  timeZone="GMT+8" />
                                          </h:outputText>
                                        </h:panelGrid>                          
                                    </h:panelGrid>
                                </h:panelGrid>
                            </h:panelGrid>
                        </h:panelGrid>
                        <h:panelGrid styleClass="title_border" columns="1" cellpadding="0" cellspacing="0">
                            <h:panelGrid styleClass="search_title" columns="1" cellpadding="0"
                                         cellspacing="2">
                                <h:outputLabel value="#{msg.content_title_motor_book}"  style="vertical-align: middle"/>
                            </h:panelGrid>
                            <h:panelGrid columns="1" cellspacing="2" style="width:100%;text-align: left;margin: 3px 5px 0px 5px" >
                                <h:panelGrid  columns="5" cellspacing="0" style="width:80%;text-align: left" rendered="#{motorBookListBean.currentOperation >= 2}">
                                    <h:panelGrid columnClasses="com_width_50,com_width_50" columns="2" cellpadding="2" border="0" cellspacing="0">
                                        <h:outputLabel value="#{msg.table_column_motor_time}" styleClass="com_label_blue"></h:outputLabel>
                                        <h:selectOneMenu value="#{motorBookListBean.currentMotorBook.bookStyle}" 
                                                         rendered="#{motorBookListBean.currentOperation >= 2}">
                                            <f:selectItems value="#{motorBookListBean.bookStyleList}"/>
                                        </h:selectOneMenu>
                                    </h:panelGrid>
                                    <h:panelGrid columnClasses="com_width_50,com_width_50" columns="2" cellpadding="2" border="0" cellspacing="0">
                                        <h:outputLabel value="#{msg.table_column_motor_bookuser}" styleClass="com_label_blue"></h:outputLabel>
                                        <h:inputText value="#{motorBookListBean.currentMotorBook.bookUsr}" rendered="#{motorBookListBean.currentOperation >= 2}"></h:inputText>
                                    </h:panelGrid>
                                    <h:panelGrid columnClasses="com_width_50,com_width_50" columns="2" cellpadding="2" border="0" cellspacing="0">
                                        <h:outputLabel value="#{msg.table_column_motor_destination}" styleClass="com_label_blue"></h:outputLabel>
                                        <h:inputText value="#{motorBookListBean.currentMotorBook.destination}" rendered="#{motorBookListBean.currentOperation >= 2}"></h:inputText>
                                    </h:panelGrid>
                                    <h:panelGrid columnClasses="com_width_50,com_width_85" columns="2" cellpadding="2" border="0" cellspacing="0">
                                        <h:outputLabel value="#{msg.table_column_motor_workremark}" styleClass="com_label_blue"></h:outputLabel>
                                        <h:inputText value="#{motorBookListBean.currentMotorBook.workRemark}" rendered="#{motorBookListBean.currentOperation >= 2}"></h:inputText>
                                    </h:panelGrid>
                                    <h:commandButton value="#{msg.bt_motor_book}"  action="#{motorBookListBean.addBook}" rendered="#{motorBookListBean.currentOperation >= 2}" />
                                </h:panelGrid>
                                <t:dataTable id="dataTable" value="#{motorBookListBean.motorBooks}"
                                             headerClass="table_header" var="motorBook"
                                             styleClass="mxl"
                                             rowClasses="list-row1-background,list-row2-background"
                                             >
                                    <t:column  width="10%" >
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.table_column_motor_bookdate}" />
                                        </f:facet>
                                        <h:outputText value="#{motorBook.bookDate}">
                                            <f:convertDateTime pattern="yyyy-MM-dd"  timeZone="GMT+8" />
                                        </h:outputText>
                                    </t:column>
                                    <t:column  width="5%" >
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.table_column_motor_time}" />
                                        </f:facet>
                                        <h:outputText value="#{motorBook.displayBookStyle}"/>
                                    </t:column>
                                    <t:column  width="10%" >
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.table_column_motor_booker}" />
                                        </f:facet>
                                        <h:outputText value="#{motorBook.booker}"/>
                                    </t:column>
                                    <t:column  width="10%" >
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.table_column_motor_bookuser}" />
                                        </f:facet>
                                        <h:outputText value="#{motorBook.bookUsr}"/>
                                    </t:column>
                                    <t:column  width="8%" >
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.table_column_motor_destination}" />
                                        </f:facet>
                                        <h:outputText value="#{motorBook.destination}"/>
                                    </t:column>
                                     <t:column  width="20%" >
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.table_column_motor_workremark}" />
                                        </f:facet>
                                        <h:outputText value="#{motorBook.workRemark}"/>
                                    </t:column>
                                    <t:column width="10%" rendered="#{motorBookListBean.currentOperation >= 2}"  >
                                        <f:facet name="header" rendered="#{motorBookListBean.currentOperation >= 2}">
                                            <h:outputText/>
                                        </f:facet>
                                        <h:commandLink  action="#{motorBookListBean.cancelBook}" value="#{msg.lnk_cancel}" rendered="#{motorBookListBean.currentOperation >= 2}" disabled="#{userLoginBean.userChName != motorBook.booker}"/>
                                    </t:column>
                                </t:dataTable>
                            </h:panelGrid>
                        </h:panelGrid>
                        <h:panelGrid columns="2" cellspacing="5" style="width:100%;text-align: left">
                            <h:panelGrid columns="2">
                                <h:commandButton value="#{msg.bt_return}" action="#{motorBookListBean.toLastPage}"/> 
                            </h:panelGrid>
                            <h:outputLabel></h:outputLabel>
                        </h:panelGrid>
                    </h:panelGrid>
                </h:form>
            </ui:define>
        </ui:composition>
    </body>
</html>